import type { App } from 'vue';
import permission from './modules/permission';
import debounce from './modules/debounce';
import throttle from './modules/throttle';

const directivesList: any = {
  debounce,
  throttle,
  permission
};

const setDirectives = {
  install(app: App<Element>) {
    Object.keys(directivesList).forEach((key) => {
      app.directive(key, directivesList[key]);
    });
  }
};

export default setDirectives;
